<div class="box-body">
    <form class="layui-form" action="{:url('/wms/unit/save')}" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">中文名</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="中文名"  name="name_ch" {if isset($unit)}value="{$unit.name_ch}"{/if}  class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">英文名</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="英文名"  name="name_en" {if isset($unit)}value="{$unit.name_en}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">代码</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="代码"  name="code" {if isset($unit)}value="{$unit.code}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="number" autocomplete="off" placeholder="排序"  name="sort" {if isset($unit)}value="{$unit.sort}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" value="1" {if !isset($unit) || (isset($unit) && $unit.status=='1')}checked{/if} lay-skin="switch">
            </div>
        </div>
        {if isset($unit)}
        <input type="hidden" name="unit_id" value="{$unit.unit_id}">
        {/if}
    </form>
</div>